#include "mywidget.h"
#include <QPushButton>

MyWidget::MyWidget(QWidget *parent, bool fixedSize)
    : QWidget(parent)
{
    if (fixedSize)
    {
        setMinimumSize(200, 120);
        setMaximumSize(200, 120);
    }

    QPushButton* quitBtn = new QPushButton("Quit", this);
    quitBtn->setGeometry(62, 40, 75, 30);
    quitBtn->setFont(QFont("Times", 18, QFont::Bold));

    connect(quitBtn, SIGNAL(clicked(bool)), this, SLOT(close()));
}

MyWidget::~MyWidget()
{

}
